package two_xia.ex2.three02;

//类似工具类
public class UserDAO {
    public static int findPermission(String userName, String userPassword) {

        if (userName.equalsIgnoreCase("zhangsan") && userPassword.equalsIgnoreCase("123456")) {
            return 0;
        } else if ("lisi".equals(userName) && "123456".equals(userPassword)) {
            return 1;
        } else if ("wangwu".equals(userName) && "123456".equals(userPassword)) {
            return 2;
        } else {
            return -1;
        }

    }
}
